package com.shop.domain.pink;

import java.util.Date;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.*;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import lombok.Data;

/**
 * <p>PinkBlack 实体类</p>
 * <p>Table: t_pink_black - 用户地址表</p>
 * @author generator
 * @date 2021-02-19 07:04:08
 */
@ApiModel("PinkBlack 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_pink_black")
@SQLDelete(sql = "update t_pink_black set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class PinkBlack extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 用户id
	 */
    @ApiModelProperty("用户id")
	@Column(name = "uid")
    private Long uid;

    /**
	 * 手机号
	 */
    @ApiModelProperty("手机号")
	@Column(name = "account")
    private String account;

    /**
	 * 中奖几率 %
	 */
    @ApiModelProperty("中奖几率 %")
	@Column(name = "chance")
    private Double chance;

    /**
	 * 添加时间
	 */
    @ApiModelProperty("添加时间")
	@Column(name = "create_time")
    private Date createTime;

    /**
	 * 是否删除
	 */
    @ApiModelProperty("是否删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;
}